package com.qm.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 @author james
 @create 2021-04-07 14:33
 */
@RestController
public class PortController {

    @Value("${server.port}")
    private Integer port;

    /**
     * 动态获取用户端口号
     */
    @RequestMapping("/getPort")
    public String getPort() {
        return "获取当前端口号：" + port;
    }
}
